package backend

import "github.com/gogf/gf/v2/frame/g"

type AttachmentCateIndexReq struct {
	g.Meta `path:"/attachment-cate/index" method:"get" summary:"资源分类列表页面" tags:"资源分类"`
}

type AttachmentCateIndexRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

// AttachmentCateListReq 获取资源分类数据
type AttachmentCateListReq struct {
	g.Meta `path:"/attachment-cate/list" method:"get" summary:"获取资源分类列表数据" tags:"资源分类"`
	Title  string `json:"title"`
	Status int    `json:"status"`
	CommonPaginationReq
}

// AttachmentCateListRes 获取资源分类数据返回
type AttachmentCateListRes struct {
	Data interface{} `json:"data"`
	CommonPaginationRes
}

type AttachmentCateShowCreateReq struct {
	g.Meta `path:"/attachment-cate/create" method:"get" summary:"新增资源分类" tags:"资源分类"`
}

type AttachmentCateShowCreateRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type AttachmentCateCreateReq struct {
	g.Meta `path:"/attachment-cate/create" method:"post" summary:"资源分类创建" tags:"资源分类"`
	Pid    uint   `json:"pid"`
	Title  string `json:"title"`
	Sort   int    `json:"sort"`
	Status int    `json:"status"`
}

type AttachmentCateCreateRes struct {
	AttachmentCateId uint `json:"attachment_cate_id"`
}

type AttachmentCateShowUpdateReq struct {
	g.Meta `path:"/attachment-cate/update/{Id}" method:"get" summary:"资源分类修改页面" tags:"资源分类"`
	Id     uint `json:"id"`
}

type AttachmentCateShowUpdateRes struct {
	g.Meta `mime:"text/html" type:"string" example:"<html/>"`
}

type AttachmentCateUpdateReq struct {
	g.Meta `path:"/attachment-cate/update/{Id}" method:"post" summary:"资源分类修改" tags:"资源分类"`
	Id     uint   `json:"id"      v:"min:1#请选择需要修改的分类" dc:"分类Id"`
	Pid    uint   `json:"pid"`
	Title  string `json:"title"`
	Sort   int    `json:"sort"`
	Status int    `json:"status"`
}

type AttachmentCateUpdateRes struct{}

type AttachmentCateDeleteReq struct {
	g.Meta `path:"/attachment-cate/delete/{Id}" method:"post" summary:"资源分类删除" tags:"资源分类"`
	Id     uint `json:"id"`
}

type AttachmentCateDeleteRes struct{}
